package net.dl.ss.domain;

import java.sql.Timestamp;
import java.util.Map;

/**
 * @author yakovlev.yuriy@gmail.com
 * @since 12.8.2008
 */
public class Event {
	private Long id;
	private String title;
	private Timestamp date;
	private Integer type;
	private Integer rank;
	private String place;
	private String organizer;
	private String masterOfCeremony;
	private String chairman;
	private String music;
	private String scrutineer;
	private String support;
	private Map<String, Round> rounds;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Timestamp getDate() {
		return date;
	}
	public void setDate(Timestamp date) {
		this.date = date;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public Integer getRank() {
		return rank;
	}
	public void setRank(Integer rank) {
		this.rank = rank;
	}
	public String getPlace() {
		return place;
	}
	public void setPlace(String place) {
		this.place = place;
	}
	public String getOrganizer() {
		return organizer;
	}
	public void setOrganizer(String organizer) {
		this.organizer = organizer;
	}
	public String getMasterOfCeremony() {
		return masterOfCeremony;
	}
	public void setMasterOfCeremony(String masterOfCeremony) {
		this.masterOfCeremony = masterOfCeremony;
	}
	public String getChairman() {
		return chairman;
	}
	public void setChairman(String chairman) {
		this.chairman = chairman;
	}
	public String getMusic() {
		return music;
	}
	public void setMusic(String music) {
		this.music = music;
	}
	public String getScrutineer() {
		return scrutineer;
	}
	public void setScrutineer(String scrutineer) {
		this.scrutineer = scrutineer;
	}
	public String getSupport() {
		return support;
	}
	public void setSupport(String support) {
		this.support = support;
	}
	public Map<String, Round> getRounds() {
		return rounds;
	}
	public void setRounds(Map<String, Round> rounds) {
		this.rounds = rounds;
	}
	
	public String toXML() {
		StringBuffer buffer = new StringBuffer();
		buffer.append("<event>");
		buffer.append("<id>" + id + "</id>");
		buffer.append("<title>" + title + "</title>");
		buffer.append("<date>" + date + "</date>");
		buffer.append("<type>" + type + "</type>");
		buffer.append("<rank>" + rank + "</rank>");
		buffer.append("<place>" + place + "</place>");
		buffer.append("<organizer>" + organizer + "</organizer>");
		buffer.append("<masterOfCeremony>" + masterOfCeremony + "</masterOfCeremony>");
		buffer.append("<chairman>" + chairman + "</chairman>");
		buffer.append("<music>" + music + "</music>");
		buffer.append("<scrutineer>" + scrutineer + "</scrutineer>");
		buffer.append("<support>" + support + "</support>");
		buffer.append("</event>");
		return buffer.toString();
	}

}
